#pragma once 

#include "stock.h"
#include "realty.h"
#include "debt.h"

class Fund
{
private:
  StockPtr stock_;
  DebtPtr debt_;
  RealtyPtr realty_;
public:
  Fund();
  ~Fund();
  void buy();
  void sell();
};

Fund::Fund() {
  stock_ = std::make_shared<Stock>();
  debt_ =  std::make_shared<Debt>();
  realty_ = std::make_shared<Realty>();
}

Fund::~Fund() {
}

void Fund::buy() {
  stock_->buy();
  debt_->buy();
  realty_->buy();
}

void Fund::sell() {
  stock_->sell();
  debt_->sell();
  realty_->sell();
}

using FundPtr = std::shared_ptr<Fund>;
